put "You selected the" && theIcon && "Icon!" into bg fld "theResult"
end mouseUp
-- part 2 (button)
-- low flags: 80
-- high flags: A003
-- rect: left=270 top=180 right=203 bottom=434
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Bottom Icons with Text
----- HyperTalk script -----
on mouseUp
put the screenrect into it
if item 4 of it <= 342 then
put 273 into top
put 100 into left
else
put 340 into top
put 110 into left
end if
ShowDialog 1,3122," Click on an icon to do something:",FALSE,top,left
if the result = 1 then
put "first" into theIcon
else if the result = 2 then
put "second" into theIcon
else if the result = 3 then
put "third" into theIcon
else if the result = 4 then
put "fourth" into theIcon
else if the result = 5 then
put "fifth" into theIcon
else if the result = 6 then
put "sixth" into theIcon
end if
put "You selected the" && theIcon && "Icon!" into bg fld "theResult"
end mouseUp
-- part 3 (button)
-- low flags: 80
-- high flags: A003
-- rect: left=283 top=137 right=160 bottom=418
-- title width / last selected line: 0
-- icon id / first selected line: 0 / 0
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: Vertical Icons
----- HyperTalk script -----
on mouseUp
put the screenrect into it
if item 4 of it <= 342 then
put 454 into left
put 0 into top
else
put 520 into left
put -8 into top
end if
ShowDialog 1,3121,"",FALSE,top,left
if the result = 1 then
put "first" into theIcon
else if the result = 2 then
put "second" into theIcon
else if the result = 3 then
put "third" into theIcon
else if the result = 4 then
put "fourth" into theIcon
else if the result = 5 then
put "fifth" into theIcon
else if the result = 6 then
put "sixth" into theIcon
else if the result = 7 then
put "seventh" into theIcon
else if the result = 8 then
put "eighth" into theIcon
end if
put "You selected the" && theIcon && "Icon!" into bg fld "theResult"
end mouseUp
-- part 5 (button)
-- low flags: 00
-- high flags: 0000
-- rect: left=11 top=4 right=64 bottom=78
-- title width / last selected line: 0
-- icon id / first selected line: 529 / 529
-- text alignment: 1
-- font id: 0
-- text size: 12
-- style flags: 0
-- line height: 16
-- part name: SD
-- part contents for background part 21
----- text -----
Color Icon Bars
-- part contents for background part 18
----- text -----
What a shame it is to have a large screen but still be welded to a 5 x 7 1/4 inch card window! Wouldn't it be great if you could extend the boundaries of HyperCard to perform certain tasks!
Do you find that your card windows get too cluttered because you try and squeeze too much on a single card?
If you have the luxury of having a large screen, you can use ShowDialog XCMD to extend the physical boundaries of HyperCard by placing the dialog box OUTSIDE the card window. This is most useful for placing an icon bar below or to the side of the card window. In designing your icon bar DLOG/DITL template, make the icons enabled. Then clicking on an icon will dismiss the dialog and return the item number of the icon in "the result."
-- part contents for background part 17
----- text -----
In your script remember to query HyperCard for the screen size first so that the icon bar will NOT appear offscreen if someone should use your stack on a small screen!
See the scripts of the demo buttons for examples of this.
Creating cicn's (color icons):
ResEdit currently does not support the creation of cicn's. In the public domain there exists an application called Color Icon Editor that will allow you to create beautiful full color icons.
CompuServe; MacPro;
Data Library 10 (Mac II Software): CICN.ED
-- part contents for background part 15
----- text -----
Use ShowDialog Type 1 to create color icon bars:
Example:
ShowDialog 1,3121,"",FALSE,top,left
where
param 1 is the type;
param 2 is the DLOG resource ID;
param 3 is a prompt;
param 4 is a BOOLEAN for outlining DITL item #1
(This wants to be FALSE for icon bars);
param 5 is the top coordinate of the dialog;
param 6 is the left coordinate of the dialog.
See the card "ShowDialog XCMD Type 1" for more information.